package com.heima.user.controller;


import com.heima.common.dto.ResponseResult;
import com.heima.user.entity.ApUser;
import com.heima.user.service.IApUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/v1/user")
public class ApUserController {

    @Autowired
    private IApUserService apUserService;

    //查询用户信息
    @GetMapping("/{id}")
    public ResponseResult<ApUser> getById(@PathVariable("id") Integer id) {
        ApUser apUser = apUserService.getById(id);
        return ResponseResult.okResult(apUser);
    }
}